<%= javascript_tag "function stripe_list( this_list ) {
                    			var even = true;
                    			$A(this_list.childNodes).each(function(value) {
                    				if(value.nodeName == 'LI') {
										if (even) {
											Element.addClassName(value, 'even');
											Element.removeClassName(value, 'odd');
										} else {
											Element.addClassName(value, 'odd');
											Element.removeClassName(value, 'even');
										}
										even =  ! even;
									}
                    			});

                    }" %>
<div id="control_panel">
<div id="local_header">
<h2>Rush Tools</h2>
<p>Logged in as <%= @logged_in_user.username %> for <%= @logged_in_user.house.name %>. <%= link_to 'log out', :controller => 'auth', :action => 'logout' %></p>
<a href="http://api.facebook.com/login.php?api_key=e4e79b84c94a40cdac33f10a2315a8d2"><img src="http://static.facebook.com/images/devsite/facebook_login.gif"></a>
</div>
<div id="col_1">
<div id="freshman_search">
<h3>Find Freshmen</h3>
<%= text_field_tag :search_name %>
<%= observe_field(:search_name,
                  :frequency => 0.5,
                  :with => 'search_name',
                  :update => 'dynamic_search_freshmen',
                  :url  => {:action => :dynamic_freshman_search}) %>
<ul id="dynamic_search_freshmen"></ul>
</div>
</div>
<div id="col_2">
<h3>Favorite Freshmen</h3>
<ul id="favorite_freshmen">
<%= render :partial => 'favorite_freshman', :collection => @this_houses_favorite_freshmen %>
<%= sortable_element 'favorite_freshmen', 
      :url => { :action => "sort"},
	:complete => "$A(document.getElementsByTagName('ul')).each(function(value) {stripe_list(value);});"	
%>
</ul>
<%= periodically_call_remote :update=> 'favorite_freshmen',
:url => { :action => 'list_favorites' }, 
:frequency => 20,
:complete => "$A(document.getElementsByTagName('ul')).each(function(value) {stripe_list(value);});" %>
</div>

<div id="col_3">
<div id="freshman_history">
</div>
</div>
</div><%= javascript_tag "$A(document.getElementsByTagName('ul')).each(function(value) {stripe_list(value);});" %>